using System;

namespace TrueCode.Core.Exceptions
{
  [Serializable]
  public class TooLongException : ArgumentException
  {
    private readonly int _maxLength;
    private readonly int _actualLength;

    public TooLongException( int maxLength, int actualLength )
    {
      _maxLength = maxLength;
      _actualLength = actualLength;
    }

    public TooLongException( int maxLength, int actualLength, string message ) : base( message )
    {
      _maxLength = maxLength;
      _actualLength = actualLength;
    }

    public TooLongException( int maxLength, int actualLength, string message, Exception innerException ) : base( message, innerException )
    {
      _maxLength = maxLength;
      _actualLength = actualLength;
    }

    public TooLongException( int maxLength, int actualLength, string message, string paramName, Exception innerException ) : base( message, paramName, innerException )
    {
      _maxLength = maxLength;
      _actualLength = actualLength;
    }

    public TooLongException( int maxLength, int actualLength, string message, string paramName ) : base( message, paramName )
    {
      _maxLength = maxLength;
      _actualLength = actualLength;
    }


    public int MaxLength
    {
      get { return _maxLength; }
    }

    public int ActualLength
    {
      get { return _actualLength; }
    }
  }
}